package com.shengwei.truck.driver.bean.task;
import android.os.Parcel;
import android.os.Parcelable;

public class TaskItem implements Parcelable {
    public String id;
    public String taskNo;
    public short taskStatus = -1;
    public String loadingCityName;
    public String unloadingCityName;
    public long createTime;  //任务发布时间
    public long endTime;
    public String weight = "20kg";
    public int getType; //获得方式类型 1分配 2自己接取
    public String planSheetId; //所属订单ID
    public String plannedReceiptTime;
    public int source; //任务来源: 0自己 1转派 2共享
    public String transferUserId;    //转派目标司机ID
    public String transferUserName; //转派目标司机名称
    public String loadingAreaName;
    public String unloadingAreaName;
    public String unit;
    public int share;
    public int transfer;
    public String upLocation;
    public String weighsStatus;
    public String goodsName = "测试水奶";  //货物名称
    public String laName = "西安声威";  //装货单位
    public String uaName = "铜川声威";//卸货单位
    public String vehiclePlateNumber = "";


    public String getVehiclePlateNumber() {
        if(vehiclePlateNumber == null){
            return "";
        }
        return vehiclePlateNumber;
    }

    public void setVehiclePlateNumber(String vehiclePlateNumber) {
        this.vehiclePlateNumber = vehiclePlateNumber;
    }

    public String getGoodsName() {
        return goodsName;
    }
    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }
    public String getLaName() {
        return laName;
    }
    public void setLaName(String laName) {
        this.laName = laName;
    }
    public String getUaName() {
        return uaName;
    }

    public void setUaName(String uaName) {
        this.uaName = uaName;
    }
    public String getUpLocation() {
        return upLocation;
    }

    public void setUpLocation(String upLocation) {
        this.upLocation = upLocation;
    }

    public String getWeighsStatus() {
        return weighsStatus;
    }

    public void setWeighsStatus(String weighsStatus) {
        this.weighsStatus = weighsStatus;
    }



    protected TaskItem(Parcel in) {
        id = in.readString();
        taskNo = in.readString();
        taskStatus = (short) in.readInt();
        loadingCityName = in.readString();
        unloadingCityName = in.readString();
        createTime = in.readLong();
        weight = in.readString();
        getType = in.readInt();
        planSheetId = in.readString();
        plannedReceiptTime = in.readString();
        source = in.readInt();
        transferUserId = in.readString();
        transferUserName = in.readString();
        loadingAreaName = in.readString();
        unloadingAreaName = in.readString();
        unit = in.readString();
        share = in.readInt();
        transfer = in.readInt();
        upLocation = in.readString();
        weighsStatus = in.readString();
        goodsName = in.readString();
        laName = in.readString();
        uaName = in.readString();

    }

    public static final Creator<TaskItem> CREATOR = new Creator<TaskItem>() {
        @Override
        public TaskItem createFromParcel(Parcel in) {
            return new TaskItem(in);
        }

        @Override
        public TaskItem[] newArray(int size) {
            return new TaskItem[size];
        }
    };

    public String getLoadingCityName() {
        return loadingCityName;
    }
    public void setLoadingCityName(String loadingCityName) {
        this.loadingCityName = loadingCityName;
    }
    public String getUnloadingCityName() {
        return unloadingCityName;
    }

    public void setUnloadingCityName(String unloadingCityName) {
        this.unloadingCityName = unloadingCityName;
    }

    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }

    public String getTaskNo() {
        return taskNo;
    }
    public void setTaskNo(String taskNo) {
        this.taskNo = taskNo;
    }
    public short getTaskStatus() {
        return taskStatus;
    }
    public void setTaskStatus(short taskStatus) {
        this.taskStatus = taskStatus;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(taskNo);
        dest.writeInt((int) taskStatus);
        dest.writeString(loadingCityName);
        dest.writeString(unloadingCityName);
        dest.writeLong(createTime);
        dest.writeString(weight);
        dest.writeInt(getType);
        dest.writeString(planSheetId);
        dest.writeString(plannedReceiptTime);
        dest.writeInt(source);
        dest.writeString(transferUserId);
        dest.writeString(transferUserName);
        dest.writeString(loadingAreaName);
        dest.writeString(unloadingAreaName);
        dest.writeString(unit);
        dest.writeInt(share);
        dest.writeInt(transfer);
        dest.writeString(upLocation);
        dest.writeString(weighsStatus);
        dest.writeString(goodsName);
        dest.writeString(laName);
        dest.writeString(uaName);
    }
}